package com.keur.money.ui.main.impl

import com.keur.money.config.KeurConfigs
import com.keur.money.http.ApiService
import com.keur.money.http.ApiService.addCommonParams
import com.keur.money.http.ApiService.addRandomParams
import com.keur.money.http.HttpHelper
import com.keur.money.http.IHttpCallback
import org.json.JSONObject

/**
 * MullaFlow
 * @Author wwdeng
 * @CreateTime: 2024/7/25 13:39
 * @Annotation：Model层  接口实现类
 */
class KeurHomeModelImpl{

    /**
     * 复制主产品信息到子产品
     */
    fun onMullaCopyMainProductToChildProductAction(targetProduct: String,callBack: IHttpCallback){
        val params = JSONObject()
            .addCommonParams()
            .addRandomParams()
            .apply {
                put("sourceProduct", KeurConfigs.KEUR_APPNAME)
                put("targetProduct", targetProduct)
            }
        val httpUrl = ApiService.getHttpUrl(ApiService.API_PATH.KEUR_API_PRODUCT_COPY_PATH)
        HttpHelper.postKeurAction(httpUrl,params,callBack)
    }

}